<template>
    <view class="bang-datetime-picker bang-input-base-bgc">
        <uni-datetime-picker v-model="value" :type="type" :placeholder="placeholder" :start="start" :end="end"
                             :disabled="disabled" @change="change"/>
    </view>
</template>

<script setup>
const emits = defineEmits(['change'])
const props = defineProps({
    modelValue: {
        default: null
    },
    placeholder: {
        default: null
    },
    type: {
        default: 'datetime'
    },
    disabled: {
        type: Boolean,
        default: false
    },
    start: {
        type: String,
        default: ''
    },
    end: {
        type: String,
        default: ''
    }
})
const value = useModel(props, 'modelValue')

const change = () => {
    emits('change')
}
</script>

<style scoped lang="scss">
:deep(.uni-date-x) {
    /*将背景色置为空*/
    background-color: #f6f5f5 !important;
}

:deep(.uni-date__x-input) {
    font-family: PingFang-SC-Medium, PingFang-SC-Medium !important;
    font-weight: normal !important;
    font-size: 28rpx !important;
}

:deep(.uni-date-editor--x) {
    border: none !important;
}

:deep(.uni-date-x) {
    color: $uni-text-color !important;
    border: 10rpx !important;
}
</style>
